from django.db import models


class UserInfo(models.Model):
    """用户信息表"""
    username = models.CharField('用户名', max_length=64, unique=True)
    password = models.CharField('密码', max_length=255)
    create_time = models.DateTimeField("创建时间", auto_now_add=True)
    update_time = models.DateTimeField("修改时间", auto_now=True)
    is_delete = models.BooleanField('是否删除', default=False)

    class Meta:
        db_table = 'user_info'


class Information(models.Model):
    """官网信息表"""
    CHECK_RESULT = [
        (1, "网站"),
        (2, "官网电话"),
        (3, "官网邮箱"),
        (4, "合作电话"),
        (5, "合作邮箱"),
        (6, "加入电话"),
        (7, "加入邮箱")
    ]
    content = models.CharField('内容', max_length=255, blank=True, null=True)

    class Meta:
        db_table = 'information'
